package com.xxxx;

import com.xxxx.controller.UserController;
import com.xxxx.dao.UserDao;
import com.xxxx.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created By ShaoXikai on 2022/7/19
 */
public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("ApplicationContext.xml");
        UserDao userDao = ac.getBean("userDao", UserDao.class);
        System.out.println("============================");
        userDao.getUserDao();
        System.out.println("============================");
        UserService userService = ac.getBean("userService", UserService.class);
        userService.getUserService();
        System.out.println("============================");
        UserController userController = ac.getBean("userController", UserController.class);
        userController.getUserController();
    }
}
